{% include 'base.html' %}
<div class = "page">
{% load url from future %}
<a href="{% url 'interview.views.index' %}"><div class="header"><h1>Question {{counter}}</h1></div></a>
<div class="login">
	{% if user.is_authenticated %}	
		<h1> You are logged in as {{user}}</h1>
	<form method = post action="{% url 'interview.views.LogUserOut' %}">
	{% csrf_token %}
		<input name="userAction" type = "submit" value="Logout"/>

	</form>
	{% if user.is_staff %}
		<a href="{% url 'admin:index' %}"><h1>Change, Add, Delete: Facts, Rules, and Questions</h1></a>
	{% endif %}
	{% else %}
	<form method = post action="{% url 'interview.views.LogUserIn' %}">
	{% csrf_token %}
		<table>
		<tr>
			<td align="left">Username:</td><td align="right"><input type="text" name="username" /></td>
		</tr>
		<tr>
			<td align="left">Password:<td align="right"><input type="password" name= "password" /></td>
		</tr>
		<tr>
			<td align="right"><input name="userAction" type = "submit" value="Login"/></td>
			<td align="right"><a href="{% url 'interview.views.register' %}">Create a new Account</a></td>		
		</tr>
		
		</table>
	</form>

	{% endif %}
</div>
<!-- Questions Html -->

{% if question %}

{% for info in debug_info %}
<P> {{info}} </P>
{% endfor %}
<div class = "questions">
<STRONG>Question {{counter}}:</STRONG>
</br>

{{question.question}}

</br>
<FORM ACTION="{% url 'interview.views.answers' %}" METHOD="GET" >
{% csrf_token %}
Yes<INPUT TYPE="radio" NAME="fact" VALUE={{question.fact}} checked>
<!--  No<INPUT TYPE="radio" NAME="fact" VALUE=""> -->
No<INPUT TYPE="radio" NAME="fact" VALUE="not_{{question.fact}}">
<input type="submit" name="op" value="Submit">
</FORM>
		
{% else %}
	<P>Eroor maybe?</P>
{% endif %}
</div>
</div>
</body>
</html>
